/**
 * This is where the 3rd party get imported and put in the global scope. 
 * 
 * This will be processed individually by Rollup to `web/js/lib-bundle.js`
 * 
 * Keep it .js to make it simple (no need to have type checking on this file)
 * 
 */

// Just need the handlebars/runtime
import Handlebars from "handlebars/runtime";
window.Handlebars = Handlebars;


// make sure the Handlebar.templates exists (will be used by templates.js as template store)
Handlebars.templates = Handlebars.template || {};
// Make all templates partials (no reason why they should not)
Handlebars.partials = Handlebars.templates;

import mvdom from "mvdom";
window.mvdom = mvdom;

import lunar from "chinese-lunar";
window.chinese_lunar = lunar;

import moment from "moment";
window.moment = moment;

// hack for rollup can not support 'require'
window.require = function (key) {
	// the char "-" will be enscape, like chinese-lunar, it will be chinese_lunar in window object
	key = key.replace("-", "_");
	return window[key];
}